-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Inbound field to admin_peers rpc call response #7443
base: master
Are you sure you want to change the base?
Add Inbound field to admin_peers rpc call response #7443
Conversation
@@ -43,13 +45,13 @@ public PeerInfo(Peer peer, bool includeDetails) | |||
IsBootnode = peer.Node.IsBootnode; | |||
IsStatic = peer.Node.IsStatic; | |||
Enode = peer.Node.ToString(Node.Format.ENode); | |||
Inbound = peer.InSession is not null && peer.InSession.Direction == ConnectionDirection.In; // assumes one of InSession/Outsession is always set.? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all InSession
should have direction.In
EthDetails = peer.Node.EthDetails; | ||
LastSignal = (peer.InSession ?? peer.OutSession)?.LastPingUtc.ToString(CultureInfo.InvariantCulture); | ||
} | ||
if (!includeDetails) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personal: I dislike jumping out from methods in the middle (it is okayish at the begining).
@@ -15,7 +15,7 @@ public class PeerInfo | |||
public string Host { get; set; } | |||
public int Port { get; set; } | |||
public string Address { get; set; } | |||
public bool IsBootnode { get; set; } | |||
public bool IsBootnode { get; set; } // change to BootNode (capitalize "N")? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change, but what is the standard?
Closes #7317
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Previous tests where smoke tests and redundant, followed the pattern.
Documentation
Requires documentation update
Link to docs update: NethermindEth/docs#223
Requires explanation in Release Notes